#ifndef OPTION_H
#define OPTION_H

#include "Random.h"
#include <iostream>
using namespace std;

class Option 
{
public:
    double S0; // stock price at time 0
    double r; // interest rate
    double k; //strike price
    double sigma; //volatility
    int T; // days
    int N; //number of trials

    Option();
<<<<<<< local
    Option(double, double, double, double, int);
    Option(string);
    ~Option();
=======
    Option(float, float, float, float, int, );
>>>>>>> other

    void setPrice(double);
    void setInt(double);
    void setStrike(double);
    void setVol(double);
    void setDays(int);
    void setTrialNumber(int n);

    double getPrice();
    virtual double getPayOff(double) = 0;
    friend ostream& operator<<(ostream&, Option&);

protected:
    Random *randSample;
    double currentPrice(double rd);
};
    
class CallOption : public Option
{
public:
    CallOption(): Option() { 
    cout << "------------------" << endl;
    cout << "Call option pricing: " << endl;
    }
    CallOption(string s): Option(s) {
    cout << "------------------" << endl;
    cout << "Call option pricing: " << endl;
    }
    double getPayOff(double);   
};

class PutOption : public Option
{
public:
    PutOption() : Option() {
    cout << "------------------" << endl;
    cout << "Put option pricing: " << endl;
    }
    PutOption(string s): Option(s) {
    cout << "------------------" << endl;
    cout << "Put option pricing: " << endl;
    }
    double getPayOff(double);
};

class PutOption : public Option
{
public:
    PutOption():Option() {};
	float getPutPrice();
};

#endif //OPTION_H
